package com.yupi.referral.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.yupi.referral.model.entity.ReferralAnswer;
import com.yupi.referral.model.entity.User;
import io.minio.errors.*;
import org.springframework.web.multipart.MultipartFile;
import com.zretc.security.entity.LoginUser;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.context.SecurityContextHolder;

import java.io.IOException;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.util.List;

/**
* @author ZRETC
* @description 针对表【referral_answer(内推响应)】的数据库操作Service
* @createDate 2024-07-04 14:14:28
*/
public interface ReferralAnswerService extends IService<ReferralAnswer> {
    /**
     * 内推响应
     *
     * @param referralId
     * @param loginUser
     * @return
     */
    long doReferralAnswer(long referralId, LoginUser loginUser, MultipartFile file) throws ServerException, InsufficientDataException, ErrorResponseException, IOException, NoSuchAlgorithmException, InvalidKeyException, InvalidResponseException, XmlParserException, InternalException;


    /**
     * 根据referralId返回对应的所有address
     *
     * @param referralId
     * @return
     */
    List<String> getAddressListByReferralId(Long referralId);
}
